package cqut.gbq.qimo.mapper;

import cqut.gbq.qimo.entity.Assignment;
import cqut.gbq.qimo.entity.Course;
import cqut.gbq.qimo.entity.Student;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CourseMapper {

    Course codeIsExist(String code);

    List<Course> getClassAndAssignment(Integer sid);

    Course getCourseById(Integer cid);

    List<Student> getCourseCount(Integer cid);

    List<Assignment> getAssignment(Integer cid,Integer sid);

    Assignment getStuWork(Integer aid, Integer sid);

    Integer addAssWorkUrl(Integer sid, Integer aid, String url);

    List<Course> getClassInfoByTid(Integer tid);

    Integer createCourse(Integer teacherId, String courseName, String courseClass, String courseYear, String courseTerm, String courseCode);

    Integer deleteCourse(Integer tid,Integer cid);

    List<Assignment> getAssignmentLinkCourse(Integer cid);

    Integer getPeopleNumber(Integer course_id);

    Integer createTeacherCourse(Integer teacherId, Integer cid);

    Integer getNotSubmit(Integer aid);

    Integer getNotCheck(Integer aid);

    Integer getCheck(Integer aid);

    Integer editCourseInfo(Integer cid, String courseName, String courseClass, String courseYear, String courseTerm);

    List<Integer> findCourseAid(Integer courseId);

    void deleteCourseByCid(Integer cid);

    Integer updateTop(Integer cid);

    Integer updateNoTop(Integer cid);

    List<Course> getCourseTop();

    Integer getAssignmentISHanin(Integer aid, Integer sid);

    Integer getAssignmentScore(Integer aid, Integer sid);

    Integer getIsCheck(Integer aid, Integer sid);
}
